    <!-- 递归  宏定义 -->
    <#macro bpTree children>
    <#if children?? && children?size gt 0>
      <#list children as m>
       <#if m.children?? && m.children?size gt 0>
            <li class="">
                <a href="javascript:;" class="dropdown-toggle stmenu" menuId="menu-${m.id}" isLeaf="false" icon="${m.icon }"
                   menuName="${m.name}">
                    <i class="menu-icon ${m.icon }"></i>
                    <span class="menu-text"> ${m.name} </span>
                    <b class="arrow fa fa-angle-down"></b>
                </a>
                <b class="arrow"></b>
                <ul class="submenu">
                    <@bpTree children=m.children />
                </ul>
            </li>
    
        <#else>
            <li class="">
                <a href="javascript:;" class="stmenu" menuId="menu-${m.id}" isLeaf="true" url="${ctx}${m.url}"
                   menuName="${m.name}">
                    <i class="menu-icon fa fa-angle-double-right"></i>
                    <span class="menu-text"> ${m.name} </span>
                </a>
                <b class="arrow"></b>
            </li>
        </#if>
       </#list>
    </#if>
    </#macro>
    <!-- 调用宏 生成递归树 -->
    <@bpTree children=menus />     
         
         
         
         
         
         
         
         
         
         